package org.javaboy.gson_demo;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * 对象->JSON字符串 序列化
 * JSON字符串->对象 反序列化
 */
public class User {
    private Integer id;
    private String username;
    private LocalDateTime birthday;

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", birthday=" + birthday +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public LocalDateTime getBirthday() {
        return birthday;
    }

    public void setBirthday(LocalDateTime birthday) {
        this.birthday = birthday;
    }
}
